#!/bin/sh
set -ex
cp -f ../regression-tests/zones/test.dyndns.orig ../regression-tests/zones/test.dyndns
cp -f ../regression-tests/zones/sub.test.dyndns.orig ../regression-tests/zones/sub.test.dyndns
export testsdir=$(pwd)
../regression-tests/runtests $1
../regression-tests/toxml

failed_tests=`cat failed_tests | wc -l`
if [ $failed_tests = 0 ];
then
	exit 0;
else
	for t in `cat failed_tests`; do
		cat $t/diff || true
	done

	exit 1;
fi
